package me.tuyou.rmi.java.service;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * @Description 必须继承Remote接口。所有参数和返回类型必须序列化(因为要网络传输)。
 * @Author tuyou_cd
 * @Date 2020/6/19 15:29
 */
public interface MyService extends Remote {

    /**
     * 所有方法必须抛出RemoteException
     * @param a
     * @param b
     * @return
     * @throws RemoteException
     */
    int add(int a, int b) throws RemoteException;

    int sub(int a, int b) throws RemoteException;
}
